<!DOCTYPE html>
{% load staticfiles %}
{% load course_tags %}
<html>

<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" >
    <title>frost在线注册</title>
    <link rel="stylesheet" type="text/css" href="{% static 'css/reset.css' %}">
    <link rel="stylesheet" type="text/css" href="{% static 'css/login.css' %}">

</head>
<body>
<header>
    <div class="c-box fff-box">
        <div class="wp header-box">
            <p class="fl hd-tips">frost在线，在线学习平台！</p>
            <ul class="fr hd-bar">
                <li>服务电话：<span>4001008031</span></li>
                <li><a href="{% url 'login' %}">[登录]</a></li>
                <li class="active"><a href="{% url 'register' %}">[注册]</a></li>
            </ul>
        </div>
    </div>
</header>
<section>
    <div class="c-box bg-box">
        <div class="login-box clearfix">
            <div class="hd-login clearfix">
                <a class="index-logo" href="{% url 'index' %}"></a>
                <h1>用户注册</h1>
                <a class="index-font" href="{% url 'index' %}">回到首页</a>
            </div>
            <div class="fl slide">
                <div class="imgslide">
                    {% get_course_banners as course_banners %}
                    <ul class="imgs">
                        {% for course in course_banners %}
                        <li>
                            <a href="{% url 'courses:course_detail' course.id %}">
                                <img width="483" height="472" src="{{ MEDIA_URL }}{{ course.image }}"/>
                            </a>
                        </li>
                        {% endfor %}
                    </ul>
                </div>
                <div class="unslider-arrow prev"></div>
                <div class="unslider-arrow next"></div>
            </div>
            <div class="fl form-box">
                <div class="tab">
                    <h2>邮箱注册</h2>
                </div>
                <div class="tab-form">
                    <form id="email_register_form" method="post" action="{% url 'register' %}" autocomplete="off">
                        {% csrf_token %}
                        <div class="form-group marb20 {% if register_form.errors %} errorput {% endif %}">
                            <label>邮&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;箱</label>
                            <input  type="email" id="id_email" name="email" placeholder="请输入您的邮箱地址" />
                        </div>
                        <div class="form-group marb8 {% if register_form.errors %} errorput {% endif %}">
                            <label>密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码</label>
                            <input type="password" id="id_password" name="password" placeholder="请输入6-20位非中文字符密码" />
                        </div>
                        <div class="form-group marb8 captcha1 {% if register_form.errors %} errorput {% endif %}">
                            <label>验&nbsp;证&nbsp;码</label>
                            {{ register_form.catpcha }}
                        </div>
                        <div class="error btns" id="jsEmailTips">
                            {% for key,error in register_form.errors.items %}
                                {{ error }}
                            {% endfor %}
                            {{ msg }}
                        </div>
                        <div class="auto-box marb8">
                        </div>
                        <input class="btn btn-green" id="jsEmailRegBtn" type="submit" value="注册并登录" />
                    </form>
                </div>
                <p class="form-p">已有账号？<a href="{% url 'login' %}">[立即登录]</a></p>
            </div>
        </div>
    </div>
</section>

<input id="isLogin" type="hidden" value="False"/>
<script src="{% static 'js/jquery.min.js' %}" type="text/javascript"></script>
<script src="{% static 'js/unslider.js' %}" type="text/javascript"></script>
<script src="{% static 'js/validateDialog.js' %}"  type="text/javascript"></script>
<script src="{% static 'js/login.js' %}"  type="text/javascript"></script>
</body>
</html>